#ifndef CUSTOMHORIZONTALHEADER_H
#define CUSTOMHORIZONTALHEADER_H

#include <QTableView>
#include <QStandardItemModel>
#include <QMouseEvent>
#include <QHeaderView>
#include <QCursor>
#include <QPainter>

// 自定义水平表头
class CustomHorizontalHeader : public QHeaderView {
public:
    CustomHorizontalHeader(Qt::Orientation orientation, QWidget *parent = nullptr);

protected:
//    void mousePressEvent(QMouseEvent *event) override;

//    void mouseMoveEvent(QMouseEvent *event) override;

//    void mouseReleaseEvent(QMouseEvent *event) override;

    void paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const override;

//    void mousePressEvent(QMouseEvent *event) override {
//        QHeaderView::mousePressEvent(event); // 调用父类方法以保持默认行为
//    }

//    void mouseReleaseEvent(QMouseEvent *event) override {
//        QHeaderView::mouseReleaseEvent(event); // 调用父类方法以保持默认行为
//    }
};
#endif // CUSTOMHORIZONTALHEADER_H
